3.14.23 \(\int (c (d \tan (e+f x))^p)^n (a+b \tan (e+f x))^m \, dx\) [1323]

Optimal. Leaf size=201 \[ \frac {F_1\left (1+n p;-m,1;2+n p;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)}+\frac {F_1\left (1+n p;-m,1;2+n p;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)} \]

[Out]

1/2*AppellF1(n*p+1,1,-m,n*p+2,-I*tan(f*x+e),-b*tan(f*x+e)/a)*tan(f*x+e)*(c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e)
)^m/f/(n*p+1)/((1+b*tan(f*x+e)/a)^m)+1/2*AppellF1(n*p+1,1,-m,n*p+2,I*tan(f*x+e),-b*tan(f*x+e)/a)*tan(f*x+e)*(c
*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m/f/(n*p+1)/((1+b*tan(f*x+e)/a)^m)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 201, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3659, 3656, 926, 140, 138} \begin {gather*} \frac {\tan (e+f x) (a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} \left (c (d \tan (e+f x))^p\right )^n F_1\left (n p+1;-m,1;n p+2;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right )}{2 f (n p+1)}+\frac {\tan (e+f x) (a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} \left (c (d \tan (e+f x))^p\right )^n F_1\left (n p+1;-m,1;n p+2;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right )}{2 f (n p+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Tan[e + f*x])^p)^n*(a + b*Tan[e + f*x])^m,x]

[Out]

(AppellF1[1 + n*p, -m, 1, 2 + n*p, -((b*Tan[e + f*x])/a), (-I)*Tan[e + f*x]]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^
p)^n*(a + b*Tan[e + f*x])^m)/(2*f*(1 + n*p)*(1 + (b*Tan[e + f*x])/a)^m) + (AppellF1[1 + n*p, -m, 1, 2 + n*p, -
((b*Tan[e + f*x])/a), I*Tan[e + f*x]]*Tan[e + f*x]*(c*(d*Tan[e + f*x])^p)^n*(a + b*Tan[e + f*x])^m)/(2*f*(1 +
n*p)*(1 + (b*Tan[e + f*x])/a)^m)

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 140

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[c^IntPart[n]*((c +
d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]), Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d
, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]

Rule 926

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)^n, 1/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && NeQ[c*d^2 + a*e^2,
 0] &&  !IntegerQ[m] &&  !IntegerQ[n]

Rule 3656

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Wit
h[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x]
, x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] &&
NeQ[c^2 + d^2, 0]

Rule 3659

Int[((c_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Tan[e + f*x])^p)^FracPart[n]/(d*Tan[e + f*x])^(p*FracPart[n])), Int[(a + b*Tan[e
+ f*x])^m*(d*Tan[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n] &&  !Intege
rQ[m]

Rubi steps

\begin {align*} \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx &=\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \int (d \tan (e+f x))^{n p} (a+b \tan (e+f x))^m \, dx\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p} (a+b x)^m}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left ((d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \left (\frac {i (d x)^{n p} (a+b x)^m}{2 (i-x)}+\frac {i (d x)^{n p} (a+b x)^m}{2 (i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p} (a+b x)^m}{i-x} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n\right ) \text {Subst}\left (\int \frac {(d x)^{n p} (a+b x)^m}{i+x} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}\right ) \text {Subst}\left (\int \frac {(d x)^{n p} \left (1+\frac {b x}{a}\right )^m}{i-x} \, dx,x,\tan (e+f x)\right )}{2 f}+\frac {\left (i (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}\right ) \text {Subst}\left (\int \frac {(d x)^{n p} \left (1+\frac {b x}{a}\right )^m}{i+x} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=\frac {F_1\left (1+n p;-m,1;2+n p;-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)}+\frac {F_1\left (1+n p;-m,1;2+n p;-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 1.66, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(c*(d*Tan[e + f*x])^p)^n*(a + b*Tan[e + f*x])^m,x]

[Out]

Integrate[(c*(d*Tan[e + f*x])^p)^n*(a + b*Tan[e + f*x])^m, x]

________________________________________________________________________________________

Maple [F]
time = 0.32, size = 0, normalized size = 0.00 \[\int \left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n} \left (a +b \tan \left (f x +e \right )\right )^{m}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m,x)

[Out]

int((c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m,x, algorithm="maxima")

[Out]

integrate(((d*tan(f*x + e))^p*c)^n*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m,x, algorithm="fricas")

[Out]

integral(((d*tan(f*x + e))^p*c)^n*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \left (a + b \tan {\left (e + f x \right )}\right )^{m}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))**p)**n*(a+b*tan(f*x+e))**m,x)

[Out]

Integral((c*(d*tan(e + f*x))**p)**n*(a + b*tan(e + f*x))**m, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m,x, algorithm="giac")

[Out]

integrate(((d*tan(f*x + e))^p*c)^n*(b*tan(f*x + e) + a)^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*tan(e + f*x))^p)^n*(a + b*tan(e + f*x))^m,x)

[Out]

int((c*(d*tan(e + f*x))^p)^n*(a + b*tan(e + f*x))^m, x)

________________________________________________________________________________________